package com.training.java.core.collections.post15.Set.Laptop;

public class Laptop {

	private String company;
	private String model;
	private String operatingSystem;
	private String processor;

	public Laptop(String company, String model, String operatingSystem) {

		this.company = company;
		this.model = model;
		this.operatingSystem = operatingSystem;
	}

	public String getCompany() {
		return company;
	}

	public String getModel() {
		return model;
	}

	public String getOperatingSystem() {
		return operatingSystem;
	}

	public String getProcessor() {
		return processor;
	}

	@Override
	public boolean equals(Object obj) {

		Laptop that = (Laptop) obj;
		if (this.getCompany().equals(that.getCompany())
				&& this.getModel().equals(that.getModel()))
			return true;
		else
			return false;

	}

	@Override
	public int hashCode() {
		return (this.getCompany().hashCode());
	}

}
